﻿using SourceCodePlugin.Collections;
using WindowsLive.Writer.Api;

namespace SourceCodePlugin
{
    public class Settings
    {
        private readonly IProperties properties;

        public int TabSize
        {
            get { return properties.GetInt("TabSize", TabSizeCollection.DefaultTabSize); }
            set { properties.SetInt("TabSize", value); }
        }

        public string Language
        {
            get { return properties.GetString("Language", LanguageCollection.DefaultLanguage); }
            set { properties.SetString("Language", value); }
        }

        public string Code
        {
            get { return properties.GetString("Code", string.Empty); }
            set { properties.SetString("Code", value); }
        }

        public Settings(IProperties properties)
        {
            this.properties = properties;
        }
    }
}
